package celiasoft.itasalib.structures;

import java.net.URL;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;

import celiasoft.itasalib.staticdata.ItasaStaticUrls;

public class News extends DataElement {

	private int _showId;
	private int _category; /* what does this number mean? */
	
	private URL _image;
	private String _imageBy;
	
	private String _team;
	private Date _submitDate;
	private String _submittedBy;
	
	private URL _thumb;
	private List<EpisodeData> _episodes;
	private NewsExtraData _extra;
	
	public News(int id) {
		super(id);
		this._episodes = new ArrayList<EpisodeData>();
		this.setExtraNewsData(new NewsExtraData());
	}
	
	public String getShowName(){
		return this.getName();
	}
	
	public void setShowName(String showName){
		this.setName(showName);
	}

	/**
	 * @return the showId
	 */
	public int getShowId() {
		return _showId;
	}

	/**
	 * @param showId the showId to set
	 */
	public void setShowId(int showId) {
		_showId = showId;
	}

	/**
	 * @return the category
	 */
	public int getCategory() {
		return _category;
	}

	/**
	 * @param category the category to set
	 */
	public void setCategory(int category) {
		_category = category;
	}

	/**
	 * @return the image
	 */
	public URL getImage() {
		return _image;
	}

	/**
	 * @param image the image to set
	 */
	public void setImage(URL image) {
		_image = image;
	}

	/**
	 * @return the imageBy
	 */
	public String getImageBy() {
		return _imageBy;
	}

	/**
	 * @param imageBy the imageBy to set
	 */
	public void setImageBy(String imageBy) {
		_imageBy = imageBy;
	}

	/**
	 * @return the team
	 */
	public String getTeam() {
		return _team;
	}

	/**
	 * @param team the team to set
	 */
	public void setTeam(String team) {
		_team = team;
	}

	/**
	 * @return the submitDate
	 */
	public Date getSubmitDate() {
		return _submitDate;
	}

	/**
	 * @param submitDate the submitDate to set
	 */
	public void setSubmitDate(Date submitDate) {
		_submitDate = submitDate;
	}

	/**
	 * @return the submittedBy
	 */
	public String getSubmittedBy() {
		return _submittedBy;
	}

	/**
	 * @param submittedBy the submittedBy to set
	 */
	public void setSubmittedBy(String submittedBy) {
		_submittedBy = submittedBy;
	}

	/**
	 * @return the thumb
	 */
	public URL getThumb() {
		return _thumb;
	}

	/**
	 * @param thumb the thumb to set
	 */
	public void setThumb(URL thumb) {
		_thumb = thumb;
	}

	/**
	 * @return the episodes
	 */
	public List<EpisodeData> getEpisodes() {
		return _episodes;
	}

	/**
	 * @param episodes the episodes to set
	 */
	public void setEpisodes(List<EpisodeData> episodes) {
		_episodes = episodes;
	}

	/**
	 * @return the extra
	 */
	public NewsExtraData getExtraNewsData() {
		return _extra;
	}

	/**
	 * @param extra the extra to set
	 */
	public void setExtraNewsData(NewsExtraData extra) {
		_extra = extra;
	}
	
	/**
	 * @return the translation
	 */
	public String getTranslators() {
		return this._extra.getTranslators();
	}

	/**
	 * @return the sync
	 */
	public String getSync() {
		return this._extra.getSync();
	}


	/**
	 * @return the resync
	 */
	public String getResync() {
		return this._extra.getResync();
	}

	/**
	 * @return the info
	 */
	public String getInfo() {
		return this._extra.getInfo();
	}

	/**
	 * @return the subtitles
	 */
	public List<Subtitle> getSubtitles() {
		return this._extra.getSubtitles();
	}

	/* (non-Javadoc)
	 * @see celiasoft.itasalib.structures.DataElement#getLink()
	 */
	@Override
	public String getLink() {
		return String.format(Locale.ITALY, ItasaStaticUrls.BASE_URL_SERIES_WEB_PAGE, this.getShowId());
	}

	
}
